<template>
  <div class="new">
    <div class="home_title">周一周四·新品首发</div>
    <ul>
      <li v-for="item in newArr" :key="item.id" @click="onClick(item.id)">
        <img :src="item.list_pic_url" width="100%" alt="" />
        <div>{{ item.name }}</div>
        <p>{{ item.retail_price | filterMoney }}</p>
      </li>
    </ul>
  </div>
</template>
 
<script>
export default {
  props: ["newArr"],
  data() {
    return {};
  },
  methods: {
    onClick(id) {
      this.$router.push("/details/" + id);
    },
  },
};
</script>
 
<style lang = "less" scoped>
.new {
  margin-top: 20px;
  background-color: #fff;
  ul {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    li {
      width: 49%;
      position: relative;
      font-size: 14px;

      div {
        height: 30px;
        line-height: 30px;
        text-align: center;
      }
      p {
        height: 30px;
        line-height: 30px;
        text-align: center;
        color: #8b0000;
      }
    }
  }
}
</style>